Imports System.Data
Imports System.Data.SqlClient
Partial Class kiemtra
    Inherits System.Web.UI.UserControl

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region
    Dim strQuyen As String
    Public Property quyen() As String
        Get
            Return strQuyen
        End Get
        Set(ByVal Value As String)
            strQuyen = Value
        End Set
    End Property

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        If Session("admin") = "" Then
            Response.Redirect("../login/loginAdmin.aspx")
        Else
            If InStr(strQuyen, Seperate(Session("admin"), "quyen")) = 0 Then
                Response.Redirect("../login/loginSuccess.aspx?access=deny")
            End If
        End If
    End Sub
    

End Class
